package com.ftg.elvis.mapper;

import com.ftg.elvis.pojo.Contact;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AdminContactMapper {

	@Select("select * from contact order by contime desc limit #{arg0}, #{arg1}")
	List<Contact> showAll(int page, int limit);

	@Select("select count(*) from contact")
	int getCount();

	@Delete("delete from contact where conid = #{conid}")
	int delete(String conid);
}
